<?php ?>
<HTML>
<HEAD>
<TITLE> Send Email to Support Shopping</TITLE>
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style type="text/css">
        .style4
        {
            height: 320px;
            width: 177px;
        }
 		.stle2
        {
            height: auto;
            width: auto;
        	border: 2px solid #4F1267;
        	padding: 2px 2px 2px 2px;
        }
        .ghk
        {
            height: 366px;
            width: 579px;
        }
 		.stle1
        {
            border: 2px #343456 solid;
        	height: 550px;
            width: 800px;
        	text-align:justify;
        	margin: 0 auto 0 auto;
        	padding-top:5px;
        	padding-bottom:10px;
        }
        </style>

</HEAD>
<BODY>
<div class="stle1">
<a></a>

<table  cellspacing="0" cellpadding="0" align="center">
		  	  <tr>
				    <td>
                     <a href="../index.php"> <img alt="" src="images/LogoGif.gif" style="height: 141px; width: 753px;" /></a>  
                      </td>
				</tr>
				   <tr>
					<td  style="width:676px; height:423px">
					<div class="stle2">
						<table  cellspacing="0" cellpadding="0">
						  <tr>
							<td class="style4">
								<a ><img src="images/back.gif" alt="" border="0" 
                                    style="height: 80px; width: 90px"></a><img src="images/pic1_1.gif" alt="" 
                                    style="height: 79px; width: 82px"><br>
								<img src="images/pic1_2.gif" alt="" style="height: 189px; width: 170px"><br>
								<a href=""><img src="images/comp.gif" alt="" border="0" 
                                    style="height: 90px; width: 87px"></a><a href=""><img 
                                    src="images/srv.gif" alt="" border="0" style="height: 91px; width: 82px"></a><br>
								<br> </td>
								
								<td>								
                            		<?php 
						//------ Edit Below This Line ------// 
						
						$recipient = 'youremail@address.com'; 
						$from = 'From: Your Site Name'; 
						$namemin = 3; // Minimum number of characters in name. 
						$contentmin = 15; // Minimum number of words in content. 
						$sub = array('Comment', 'Complaint', 'Suggestion', 'Other'); 
						
						//------ Edit Above This Line ------// 
						
						$name = strip_tags(trim(stripslashes($_POST['name']))); 
						$email = strip_tags(trim(stripslashes($_POST['email']))); 
						$subject = $_POST['subject']; 
						$content = htmlspecialchars(trim(stripslashes($_POST['content']))); 
						
						$success = "<h2>Thank You!</h2>Thank you for filling out the
						 form!"; 
						$errors = array(); 
						
						if (isset($_POST['submit'])) 
						{ 
						function checkEmail($email) 
						  { 
						    if 
							(preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/",
							 $email)) 
						    { 
						      $domain = array_pop(explode("@",$email)); 
						      if (gethostbyname($domain) != $domain) 
						      { 
						        return true; 
						      } 
						      return false; 
						    } 
						    return false; 
						  } 
						
						  if (!eregi("^[a-z[:space:]]{{$namemin},}$", $name)) 
						    $errors[] = "Your name must contain at least $namemin letters."; 
						  if (!checkEmail($email)) 
						    $errors[] = 'You must have a valid email address.'; 
						  if ($subject == -1 || !in_array($subject, $sub)) 
						    $errors[] = 'You must choose a subject.'; 
						  if (str_word_count($content) < $contentmin) 
						    $errors[] = "Your submission must contain at least $contentmin 
						words."; 
						} 
						
						if (!empty($errors) || $_SERVER['REQUEST_METHOD'] != 'POST') 
						{ 
						  if (!empty($errors)) 
						  { 
						    foreach ($errors as $error) 
						    { 
						      echo "<b>$error</b><br />"; 
						    } 
						  } 
						
						  echo '<p><form method="post"><table> 
						  <tr><td>Name:</td><td><input type="text" 
							name="name" value="' . $name . '" size="30"></td></tr> 
						  	<tr><td>Email:</td><td><input type="text" 
							name="email" value="' . $email . '" size="30"></td></tr> 
						  	<tr><td>Subject: </td><td><select 
							name="subject"> 
						  <option value="-1">-Select-</option>'; 
						
						  foreach ($sub as $type) 
						  { 
						    $selected = ($subject == $type) ? 'selected="selected"' : ''; 
						    echo "<option $selected>$type</option>"; 
						  } 
						
						  echo '</select></td></tr> 
						  <tr><td>Content:</td><td><textarea 
						  name="content" rows="6" cols="40" style="height: 183px; width: 460px">' . $content . 
						  '</textarea></td></tr> 
						  <tr><td colspan="2" align="center"><input type="submit"
						 name="submit" value="Submit"></td></tr> 
						  </table></form></p>'; 
						} 
						else 
						{ 
						  $msgsubject = "Feedback: $subject"; 
						  $msg = "Contact Form 
						
						------------------------------ 
						
						Name: $name 
						Email: $email 
						Subject: $subject 
						
						Content: 
						$content 
						
						------------------------------"; 
						
						  mail($recipient, $msgsubject, $msg, $from); 
						  echo $success; 
						} 
						?>
                                </td>
                               
						  </tr>
						  
						</table>
						 </div>
					</td>	
				
				  </tr>
				   </table>
				</div>   
		</BODY>
</HTML>

									
								
		
				